package thinking.in.spring.boot.samples.myself.bootstarp;


import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import thinking.in.spring.boot.samples.myself.config.EnableHelloWorld;

@EnableHelloWorld
@Configuration
public class EnableHelloWorldBootstarp {

    public static void main(String[] args) {

        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();

        context.register(EnableHelloWorldBootstarp.class);

        context.refresh();

        String helloWorld = context.getBean("hello", String.class);

        System.out.println(helloWorld);

        context.close();
    }

}
